#ifndef MYSQLDATABASE_H
#define MYSQLDATABASE_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QDebug>

#include "global_header/globaldata.h"

class MySqlDatabase : public QObject
{
    Q_OBJECT

private:
    QSqlDatabase db;
    QSqlQuery query;

public:
    explicit MySqlDatabase(QString connectionName);
    ~MySqlDatabase();

public:
    bool queryData(QString sqlquery) { return query.exec(sqlquery);}
    bool first() { return query.first(); }

};

#endif // MYSQLDATABASE_H
